To restrict a page to logged in users only, just below the authenticate function, add this<br /><br />
<br />if(!$user['U_Username']) {<br /> $html = new html;<br /> $html -> not_right("You must be logged in to view this page.",$Cat);<br />}<br /><br /><br /><br />To restrict a page to a specific usergroup, first:<br /><br />Find this:<br />
<br /> $user = $userob -> authenticate();<br />
<br /><br />Change to this:<br />[/code]<br /> $user = $userob -> authenticate("U_Groups");<br />[/code]<br /><br /><br />Below that, let's assume that you only want to allow access to usergroup #5, and if they aren't in the #5 group, we block them<br />Add this:<br />
<br />if (!strstr($user['U_Groups'],"-5-")) {<br /> $html = new html;<br /> $html -> not_right("You are not authorized to view this page.",$Cat);<br />}<br /><br /><br />To account for allowing multiple usergroups, example admins, moderators and group 5 are allowed:<br />
<br />if ((!strstr($user['U_Groups'],"-5-")) && (!strstr($user['U_Groups'],"-1-")) && (!strstr($user['U_Groups'],"-2-"))) {<br /> $html = new html;<br /> $html -> not_right("You are not authorized to view this page.",$Cat);<br />}<br /><br /><br />That should do it. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />